package com.etone.smartAudit.service;

import com.etone.smartAudit.mapper.GatherServerMapper;
import com.etone.smartAudit.vo.PagerVO;
import com.etone.smartAudit.vo.gatherServer.GatherServerVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author: 蒋学伟
 * @create: 2020-06-20 15:41:05
 * @Description 数据服务能力
 */
@Service
@AllArgsConstructor
public class GatherServerService {

    private GatherServerMapper gatherServerMapper;

    /**
     * 查询数据服务列表
     *
     * @param page
     * @param pageSize
     * @return
     */
    public PagerVO<GatherServerVO> listGatherServerVO(int page, int pageSize) {
        Page<GatherServerVO> gatherServerVOPage = PageHelper.startPage(page, pageSize).doSelectPage(() -> {
            gatherServerMapper.findListGatherServerVO();
        });
        return PagerVO.of(gatherServerVOPage);
    }
}
